﻿#pragma once

#include "pch.h"
#include "TcpClient.h"

struct TcpServer
{
	struct Desc
	{
		unsigned int port = 6666;
		unsigned int af = AF_INET;
		unsigned int type = SOCK_STREAM;
		unsigned int protocol = IPPROTO_TCP;

		unsigned int sAddr = INADDR_ANY;
		unsigned int sinFamily = AF_INET;

		unsigned int backLog = 10;
	};

    uint64_t sock;
	TcpClient Accept();
	bool Create(const TcpServer::Desc& desc);
	void Close();

};

